import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/About.vue")
  },
  {
    path: "/debounce",
    name: "debounce",
    component: () => import("../views/debounce.vue")
  },
  {
    path: "/dialog",
    name: "dialog",
    component: () => import("../views/dialog.vue")
  },
  {
    path: "/idea",
    name: "idea",
    component: () => import("../views/idea.vue")
  },
  {
    path: "/layout",
    name: "layout",
    component: () => import("../views/layout.vue")
  },
  {
    path: "/style",
    name: "style",
    component: () => import("../views/style.vue")
  },
  {
    path: "/throttle",
    name: "throttle",
    component: () => import("../views/throttle.vue")
  },
  {
    path: "/toast",
    name: "toast",
    component: () => import("../views/toast.vue")
  },
  {
    path: "/unique",
    name: "unique",
    component: () => import("../views/unique.vue")
  },
  {
    path: "/upload",
    name: "upload",
    component: () => import("../views/upload.vue")
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
